package cn.lili.modules.order.order.mapper;

import cn.lili.modules.order.order.entity.dos.RankingDistribution;
import cn.lili.modules.order.order.entity.dto.RankingDistributionDTO;
import cn.lili.modules.order.order.entity.vo.DistributionAndGrowAwardVO;
import cn.lili.modules.order.order.entity.vo.RankingDistributionVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 排名活动-店主表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-12-25
 */
public interface RankingDistributionMapper extends BaseMapper<RankingDistribution> {

    /**
     * 分页获取店主列表
     * @param page
     * @param dto
     * @return
     */
    Page<RankingDistributionVO> selectDistributionVOPage(Page<RankingDistribution> page, RankingDistributionDTO dto);

    /**
     * 查询下级明细
     * @param page
     * @param dto
     * @return
     */
    Page<RankingDistributionVO> getLowerDistributeionDetails(Page<RankingDistribution> page, RankingDistributionDTO dto);

    /**
     * 店家列表
     * @param page
     * @param dto
     * @return
     */
    Page<DistributionAndGrowAwardVO> selectDistributionPageListNew0(Page<RankingDistribution> page, RankingDistributionDTO dto);
    Page<DistributionAndGrowAwardVO> selectDistributionPageListNew1(Page<RankingDistribution> page, RankingDistributionDTO dto);

    /**
     * 更改店主的佣金、直推人数
     */
    int updateRankingDistribution(@Param("param") RankingDistribution param);
}
